package com.ruoyi.common.config;

import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;


@Component
public class AiBaseInfoConfig {


    @Getter
    private static String minerUToken;

    @Getter
    private static String minerUUrl;
    @Getter
    private static String textInUrl;
    @Getter
    private static String textInApiId;
    @Getter
    private static String textInApiKey;


    @Getter
    private static String ossAccessKeyId;
    @Getter
    private static String ossAccessKeySecret;
    @Getter
    private static String ossEndPoint;
    @Getter
    private static String ossBucketName;
    @Getter
    private static String ossUrl;
    @Getter
    private static String immEndPoint;
    @Getter
    private static String immProjectName;

    /**
     * 百炼平台秘钥
     */
    @Getter
    private static String key;

    /**
     * openAi逻辑模型请求地址
     */
    @Getter
    private static String openAiUrl;

    /**
     * dashscope逻辑模型请求地址
     */
    @Getter
    private static String dashscopeUrl;

    /**
     * 逻辑模型名称
     */
    @Getter
    private static String model;

    /**
     * openAi视觉模型请求地址
     */
    @Getter
    private static String openAiVlUrl;

    /**
     * 视觉模型名称
     */
    @Getter
    private static String vlModel;

    /**
     * 向量模型请求地址
     */
    @Getter
    private static String embeddingUrl;

    /**
     * 向量模型名称
     */
    @Getter
    private static String embeddingModel;

    /**
     * 连接类型
     */
    @Getter
    private static String connectType;


    @Getter
    private static String documentSplitUrl;

    @Getter
    private static String documentSplitKey;

    @Value("${aliyun.openSearch.documentSplit.url}")
    public void setDocumentSplitUrl(String url) {
        AiBaseInfoConfig.documentSplitUrl = url;
    }

    @Value("${aliyun.openSearch.documentSplit.key}")
    public void setDocumentSplitKey(String key) {
        AiBaseInfoConfig.documentSplitKey = key;
    }


    @Value("${tongyi.api.openAiVlUrl}")
    public void setOpenAiVlUrl(String openAiVlUrl) {
        AiBaseInfoConfig.openAiVlUrl = openAiVlUrl;
    }

    @Value("${tongyi.api.dashscopeUrl}")
    public void setDashscopeUrl(String dashscopeUrl) {
        AiBaseInfoConfig.dashscopeUrl = dashscopeUrl;
    }

    @Value("${tongyi.api.vlModel}")
    public void setVlModel(String vlModel) {
        AiBaseInfoConfig.vlModel = vlModel;
    }

    @Value("${tongyi.api.connectType}")
    public void setConnectType(String connectType) {
        AiBaseInfoConfig.connectType = connectType;
    }

    @Value("${tongyi.api.key}")
    public void setKey(String key) {
        AiBaseInfoConfig.key = key;
    }

    @Value("${tongyi.api.openAiUrl}")
    public void setOpenAiUrl(String openAiUrl) {
        AiBaseInfoConfig.openAiUrl = openAiUrl;
    }

    @Value("${tongyi.api.model}")
    public void setModel(String model) {
        AiBaseInfoConfig.model = model;
    }

    @Value("${tongyi.api.embeddingUrl}")
    public void setEmbeddingUrl(String embeddingUrl) {
        AiBaseInfoConfig.embeddingUrl = embeddingUrl;
    }

    @Value("${tongyi.api.embeddingModel}")
    public void setEmbeddingModel(String embeddingModel) {
        AiBaseInfoConfig.embeddingModel = embeddingModel;
    }

    @Value("${aliyun.ossAccessKeyId}")
    public void setOssAccessKeyId(String ossAccessKeyId) {
        AiBaseInfoConfig.ossAccessKeyId = ossAccessKeyId;
    }

    @Value("${aliyun.ossAccessKeySecret}")
    public void setOssAccessKeySecret(String ossAccessKeySecret) {
        AiBaseInfoConfig.ossAccessKeySecret = ossAccessKeySecret;
    }

    @Value("${aliyun.ossEndPoint}")
    public void setOssEndPoint(String ossEndPoint) {
        AiBaseInfoConfig.ossEndPoint = ossEndPoint;
    }

    @Value("${aliyun.ossBucketName}")
    public void setOssBucketName(String ossBucketName) {
        AiBaseInfoConfig.ossBucketName = ossBucketName;
    }

    @Value("${aliyun.ossUrl}")
    public void setOssUrl(String ossUrl) {
        AiBaseInfoConfig.ossUrl = ossUrl;
    }

    @Value("${aliyun.immEndPoint}")
    public void setImmEndPoint(String immEndPoint) {
        AiBaseInfoConfig.immEndPoint = immEndPoint;
    }

    @Value("${aliyun.immProjectName}")
    public void setImmProjectName(String immProjectName) {
        AiBaseInfoConfig.immProjectName = immProjectName;
    }


    @Value("${textIn.textInUrl}")
    public void setTextInUrl(String url) {
        AiBaseInfoConfig.textInUrl = url;
    }

    @Value("${textIn.textInApiId}")
    public void setTextInApiId(String apiId) {
        AiBaseInfoConfig.textInApiId = apiId;
    }

    @Value("${textIn.textInApiKey}")
    public void setTextInApiKey(String apiKey) {
        AiBaseInfoConfig.textInApiKey = apiKey;
    }

    @Value("${minerU.url}")
    public void setMinerUUrl(String url) {
        AiBaseInfoConfig.minerUUrl = url;
    }


}
